﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sort_Grammar.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Lesson.sort_Grammar" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <tbody id="sortable">
        <%
            int id = int.Parse(Request.QueryString["id"]);
            var get_grammar = from p in new TblLessonGrammarController().FetchAll() orderby p.GramIndex ascending where p.LessonId == id && p.GramActive==true select p;
            foreach (TblLessonGrammar grammar in get_grammar)
            { %>
        <tr id="grammar_row<%=grammar.GramId %>" class="word_row ui-state-default" style="cursor: pointer">
            <td class="w3-hide sort_grammar_id"><%=grammar.GramId %></td>
            <td class="grammar_name"><%=grammar.GramName %></td>
        </tr>
        <%}
        %>
    </tbody>
</body>
</html>
